import chatbot.config as config

entity_list = [item.split(" ")[0].strip() for item in open(config.user_dict_path, encoding='utf-8').readlines()]


def get_entity(sentence):
    entity = []
    for item in entity_list:
        if sentence.count(item) > 0:
            entity.append(item)
    return entity
